/*
 * Copyright Eduardo Aponte 2013
 * aponteeduardo@gmail.com
 */
#include <eyelink.h>
#include "mex.h"



INT16 _main( void )
{
    return eyelink_open(); 
}


void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
    mwSize td[2] = {1,1};
    double *status;
    /* Verify input arguments. */
    if(nrhs > 1 ) {
        mexErrMsgTxt("Incorrect number of inputs");
    } else if(nlhs>1) {
        mexErrMsgTxt("Too many output arguments.");
    }
    
    plhs[0] = mxCreateNumericArray( 2, td, mxDOUBLE_CLASS, mxREAL);
    status = mxGetPr(plhs[0]);    
    status[0] = (double ) _main();

    return;
    
}


